package de.yvert.jingle.impl.openexr;

import java.io.IOException;

public class LineOrderAttribute extends Attribute
{

public static final String TYPE = "lineOrder";
public static final int SIZE = 1;

private final LineOrder lineOrder;

public LineOrderAttribute(String name, LineOrder lineOrder)
{
	super(name);
	this.lineOrder = lineOrder;
}

@Override
public String toString()
{ return TYPE+" \""+getName()+"\" = "+lineOrder; }

@Override
public void write(ExrOutputStream out) throws IOException
{
	out.writeString(getName());
	out.writeString(TYPE);
	out.writeInt(SIZE);
	out.writeByte(lineOrder.getCode());
}

}
